<%-- 
    Document   : forum_userAndBankuai
    Created on : 2017-7-14, 13:43:33
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <!--定时刷新界面，20秒-->
        <!--<meta http-equiv="refresh" content="20">-->
        <title>论坛用户和版块数据监测</title>
        <link rel="stylesheet" type="text/css" href="extjs/build/classic/theme-crisp/resources/theme-crisp-all.css">
        <link rel="stylesheet" type="text/css" href="extjs/build/classic/theme-crisp/resources/theme-crisp-all-debug.css">

        <script type="text/javascript" charset="UTF-8" src="extjs/build/ext-bootstrap.js"></script>
        <script type="text/javascript" charset="UTF-8" src="extjs/build/ext-all.js"></script>
        <script type="text/javascript" charset="UTF-8" src="extjs/build/ext-all-debug.js"></script>
        <script type="text/javascript" charset="UTF-8" src="extjs/build/classic/locale/locale-zh_CN.js"></script>
        <script type="text/javascript" charset="UTF-8" src="extjs/build/classic/locale/locale-zh_CN-debug.js"></script>
        <script type="text/javascript">
            Ext.onReady(function () {
                Ext.tip.QuickTipManager.init(); //初始化提示
                Ext.EventManager.onWindowResize(function (width, height) {
//                    panel.center();//设置窗口随着浏览器大小而居中显示
                    viewport.setHeight(height);
                    viewport.setWidth(width);
//                    Ext.Msg.alert("提示", "窗口大小已经改变" + width + ";" + height);//能进来方法
                });
                var today = new Date();
                var todayDate = Ext.util.Format.date(today, "Ymd");
                var tab = Ext.create("Ext.tab.Panel", {
                    id: 'tab_forum_userAndSectionjsp',
                    tabPosition: "top", // 标签条的位置 top left right bottom
                    defaults: {
                        iconAlign: "top", // icon对其方式 top left right bottom
                        textAlign: "center", // 文本对其样式 left right center
                        bodyPadding: 15,
                        scrollable: true, // 允许滚动
                        closable: false  // 允许关闭
                    },
                    layout: 'border',
                    border: false,
                    width: Ext.getBody().getViewSize().width,
                    height: Ext.getBody().getViewSize().heigt,
                    tabBar: {
                        layout: {
                            pack: "center"
                        }
                    },
                    activeTab: 0,
                    items: [
                        {
                            xtype: "panel",
                            id: "forum_userAccess",
                            title: "用户接入统计",
//                            glyph: "xf015@FontAwesome",
//                            html: "实时统计",
                            closable: false,
                            width: Ext.getBody().getViewSize().width,
//                            height: "100",
                            autoScroll: true, //滚动条 
                            items: [
                            ],
                            listeners: {
                                //render是加载的时候触发一次，beforeshow是标签切换会触发
                                "activate": function () {
                                    Ext.getCmp("forum_userAccess").setHtml("<iframe scrolling=\"auto\" frameborder=\"0\" width=\"100%\" height=\"100%\" src=\"forum_user_supervise.htm\"></iframe>");

                                }
                            }
                        },
                        {
                            xtype: "panel",
                            id: "forum_sectionAccess",
                            title: "版块数据统计",
//                            glyph: "xf015@FontAwesome",
//                            html: "实时统计",
                            closable: false,
                            width: Ext.getBody().getViewSize().width,
//                            height: "100",
                            autoScroll: true, //滚动条 
                            items: [
                            ],
                            listeners: {
                                //render是加载的时候触发一次，beforeshow是标签切换会触发
                                "activate": function () {
                                    Ext.getCmp("forum_sectionAccess").setHtml("<iframe scrolling=\"auto\" frameborder=\"0\" width=\"100%\" height=\"100%\" src=\"forum_bankuai_supervise.htm\"></iframe>");

                                }
                            }
                        },
                    ]
                });
                var viewport = Ext.create('Ext.container.Viewport', {
                    layout: 'border',
                    width: Ext.getBody().getViewSize().width,
                    height: Ext.getBody().getViewSize().height,
                    items: [
                        {
                            region: "north",
                            xtype: "panel",
                            titleAlign: "center",
                        },
                        {
                            region: 'center',
                            xtype: 'panel', // TabPanel itself has no title
                            activeTab: 0, // First tab active by default
                            layout: "fit", //layout必须匹配，不然区域会很难设置
                            items: [
                                tab
                            ]
                        }]
                });
            });
        </script>
    </head>
    <body>
    </body>
</html>

